from langchain_core.prompts import PromptTemplate,ChatPromptTemplate


system_chat_prompt = ChatPromptTemplate.from_messages(
    [
        ("system","你是OpenAI 开发的机器人，请根据用户的问题来回答，我叫{name}")
    ]
)

human_chat_prompt = ChatPromptTemplate.from_messages([
    ("human","{query}")
])

chat_prompt = system_chat_prompt + human_chat_prompt

print(chat_prompt.invoke({
    "name":"博小瑞",
    "query":"我叫博小瑞，喜欢滑冰，请问你叫什么"
}))

